<!doctype html>
<html>
<head>
  <script type="module" src="../../polymer-legacy.js"></script>
</head>
<body>


  <dom-module id="my-element">
    
    <template>
      <style>
        :host {
          display: block;
        }
        .parent {
          border: 1px solid red;
          justify-content: space-between;
          width: 300px;
          display: flex;
        }
        .child {
          border: 1px solid green;
          width: 100px;
        }
      </style>
      <div class='parent'>
        <div class='child'>Child1</div>        
        <template is='dom-if' if='1'>
          <div class='child'>Child2</div>
        </template>
      </div>
    </template>

   
    <!-- Uncomment for class syntax -->
    <script type="module">
import { PolymerElement } from '../../polymer-element.js';
class MyElement extends PolymerElement {
  static get is() { return 'my-element'; }
  static get properties() {
    return {
      prop: {
        type: String
      }
    }
  }
  constructor() {
    super();
    this.prop = 'my-element'
  }
}
customElements.define(MyElement.is, MyElement);
</script>
    
  </dom-module>

  <my-element></my-element>
  
</body>
</html>